import React, { Component } from 'react';

class App extends Component {

    state ={
        checked :true
    }
    handleChang =(e) => {
        console.log(e.target.checked)
        this.setState({
            checked:e.target.checked
        })
        
    }
    render() {
        return (
            <div>
                <input type="checkbox" checked={this.state.checked}  onChange={this.handleChang}/>
            </div>
        );
    }
}

export default App;
